package com.cl.ks.controller;


import com.cl.ks.dto.KsFlowGraphRecordRequestModel;
import com.cl.ks.entity.KsFlowGraphRecord;
import com.cl.ks.service.KsFlowGraphRecordService;
import com.cl.mvc.controller.BaseController;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("KsFlowGraphRecord")
public class KsFlowGraphRecordController extends BaseController<KsFlowGraphRecord> {
    private final KsFlowGraphRecordService ksFlowGraphRecordService;
    public KsFlowGraphRecordController(KsFlowGraphRecordService service, KsFlowGraphRecordService ksFlowGraphRecordService) {
        super(service);
        this.ksFlowGraphRecordService = ksFlowGraphRecordService;
    }

    @PostMapping("pageLastRecord")
    public Page<KsFlowGraphRecord> pageLastRecord(@RequestBody KsFlowGraphRecordRequestModel entity, @RequestHeader(name = "Authorization", defaultValue = "") String auth) {
       return ksFlowGraphRecordService.pageLastRecord(entity, auth);
    }
}
